@echo off
REM Create-ENV batch script by zerox (23:21 2006.10.20)
REM Update: 20:13 2010/1/10, fix bug of path containing ()
SetLocal EnableDelayedExpansion

echo Init: !CD!
IF x"%~1" EQU x"" (
  SET PATH=!CD!;!PATH!
) ELSE (
  CD /D "%~1"
  SET PATH=!CD!;!PATH!
)
ECHO Added PATH: !CD!

IF x"%~2" NEQ x"" (
  CD /D "%~2"
)

%COMSPEC%
